package com.springcloudalibaba.controller;

import com.springcloudalibaba.domain.CommonResult;
import com.springcloudalibaba.domain.Order;
import com.springcloudalibaba.service.OrderService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * Title: OrderController
 * Description: TODO
 *
 * @author gejx
 * @version V1.0
 * @date 2022-01-12
 */
@RestController
public class OrderController {
    @Resource
    private OrderService orderService;

    @PostMapping("/order/create")
    public CommonResult create(Order order){

        orderService.create(order);
        return new CommonResult(200,"操作成功");
    }
}
